import { request } from '@/utils/request';
import CRUD from '@/utils/request/CRUD';

// 订单记录CRUD
export const orderRecordCRUD = CRUD('/system/order-message');

// 获取设计信息列表
export function getDesignInfoList(params: Record<string, any>) {
  return request.get({
    url: '/system/order-designer/get-design-info',
    params,
  });
}

// 创建设计信息
export function createDesignInfo(data: Record<string, any>) {
  return request.post({
    url: '/system/order-designer/save-design-info',
    data,
  });
}

// 获取平面信息列表
export function getPlanInfoList(params: Record<string, any>) {
  return request.get({
    url: '/decoration/plan-info/list-by-orderId',
    params,
  });
}

// 创建平面信息
export function createPlanInfo(data: Record<string, any>) {
  return request.post({
    url: '/decoration/plan-info/create',
    data,
  });
}

// 获取立面信息列表
export function getFacadeInfoList(params: Record<string, any>) {
  return request.get({
    url: '/decoration/facade-info/list-by-orderId',
    params,
  });
}

// 创建立面信息
export function createFacadeInfo(data: Record<string, any>) {
  return request.post({
    url: '/decoration/facade-info/create',
    data,
  });
}

// 获取历史预算
export function getBudgetHistory() {
  return request.get({
    url: '/system/order-designer/get-budget-history',
  });
}

// 导入预算模板
export function importBudgetModel(data: Record<string, any>) {
  return request.post({
    url: '/system/order-designer/import-budget-model',
    data,
  });
}
// 导入历史模板
export function importBudgetHistory(data: Record<string, any>) {
  return request.post({
    url: '/system/order-designer/import-budget-history',
    data,
  });
}
// 预算模板库CRUD
export const budgetOrderDataCRUD = CRUD('/system/budget-order-data');


// 预算模板分类
export const budgeOrderSumCRUD = CRUD('/system/budget-order-sum');

// 预算模板sheet
export const budgeOrderSheetCRUD = CRUD('/system/budget-order-sheet');

// 预算模板空间
export const budgeOrderSpaceCRUD = CRUD('/system/budget-order-space');